<?
    final class Principio_View_Helper_Accounts extends Zend_View_Helper_Abstract
    {
        public function accounts()
        {
            $html = "";

            foreach ($this->view->model_company->getAccountCollection() as $model_account)
            {
                $html .= "<li><a href=\"\" ".($model_account->getID() == $this->view->id ? "class=\"active\"" : "")." onClick=\"ajaxAccounts({company_id: ".$this->view->model_company->getID().", id: ".$model_account->getID().", action: 'view', use_inner: true, no_apply: true}); return false;\">".
                    $model_account->getDisplayName()." [".$model_account->getLogin()." : ".$model_account->getPassword()."]</a></li>";
            };

            $html .= "<li class=\"add_item\"><a href=\"\" ".($this->view->id == -1 ? "class=\"active\"" : "")." onClick=\"addItem({menu: 'accounts', container: 'inner', company_id: ".$this->view->model_company->getID()."}); return false;\">Add new account</a></li>";

            return $html;
        }
    };
?>